use std::sync::RwLock;
use once_cell::sync::Lazy;

static PROJECT_BASE_DIR: Lazy<RwLock<String>> = Lazy::new(|| {
    RwLock::new(String::new()) // 初始空值
});

// 更新配置
pub fn update_project_base_dir(new_value: String) {
    *PROJECT_BASE_DIR.write().unwrap() = new_value;
}

// 读取配置
pub fn get_project_base_dir() -> String {
    PROJECT_BASE_DIR.read().unwrap().clone()
}